package com.hhxy.map;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.function.BiConsumer;

public class TestMap {
    public static void main(String[] args) {
        Map<String,Integer> maps = new HashMap<>();
//        Set<Map.Entry<String, Integer>> entries = maps.entrySet();
/*        for(Map.Entry<String, Integer> entry:entries){
            String key = entry.getKey();
            int value = entry.getValue();
            System.out.println(key+"="+value);
        }*/
/*        maps.forEach(new BiConsumer<String, Integer>() {
            @Override
            public void accept(String key, Integer value) {
                System.out.println(key+"="+value);
            }
        });*/
        maps.put("a",1);
        maps.put("b",2);
        maps.put("c",3);
        maps.forEach((key , value) -> System.out.println(key+"="+value));



    }
}
